#!/bin/sh

START=$1
END=$2
TIME=$3
SOURCE=$4
while [  $START -lt $END ]; do
	./tsctp -l $START -T $TIME -L $SOURCE $5 
	if [ $START -lt 100 ]; then
		START=`expr $START + 1`
	fi
	if [ $START -ge 100 -a $START -lt 1000 ]; then
		START=`expr $START + 10`
	fi
	if [ $START -ge 1000 -a $START -lt 10000 ]; then
		START=`expr $START + 100`
	fi
	if [ $START -ge 10000 ]; then
		START=`expr $START + 1000`
	fi
	sleep 5
done
